<template>
  <div class="container">
    <el-dialog
      title="盘点明细详情"
      :visible.sync="particularsDialogs.centerDialogVisible"
      @open="getData"
      @close="confirm"
      center
    >
      <el-table :data="tableData" border style="width: 100%" empty-text="暂无数据">
        <el-table-column prop="goods_name" label="商品名称" align="center"></el-table-column>
        <el-table-column prop="inp_out_num" label="出入库数量" align="center"></el-table-column>
        <el-table-column prop="inp_out_price" label="出入库价格" align="center"></el-table-column>
        <el-table-column prop="supplier_name" label="供应商名称" align="center"></el-table-column>
      </el-table>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="confirm">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { stockDetailsGoodsDetail } from "@/api/check/check.js";
export default {
  props: {
    particularsDialogs: Object
  },
  data() {
    return {
      tableData: [],
    };
  },
  created(){
  },
  methods: {
    //关闭
    confirm() {
      this.particularsDialogs.centerDialogVisible = false;
    },
    // 获取数据
    getData() {
        this.tableData = [];
      this.center = [];
      let data = {
        take_stock_goods_id: this.particularsDialogs.id
      };
      stockDetailsGoodsDetail(data).then(res => {
        if (res.code == 0) {
          this.tableData = res.data;
        }
      });
    }
  }
};
</script>
<style scoped>
.pagination {
  text-align: right;
  padding: 10px;
  background-size: cover;
}

</style>